<template>
  <el-dropdown>
    <m-iconfont class="more" classify='m-pc-public'  color='#85AAFD' size='12' icon="m-pc-public_more" />
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item v-for="item in routerConfig" :key="item.label">
        <span @click.stop="toDoSomeByPath(item)">
          {{ item.label }}
        </span>
      </el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
export default {
  name: 'MoreDropdownMenu',
  props: {
    routerConfig: {
      type: Array,
      default: function() {
        return [];
      }
    }
  },
  data() {
    return {};
  },
  methods: {
    // 根据路径跳转
    toDoSomeByPath({ path }) {
      if (!path) return;
      this.$router.push({
        path
      });
    }
  }
};
</script>

<style scoped>
.more {
  font-size: 12px;
  cursor: pointer;
  height: 100%;
  margin: 0 15px 0 0;
}
</style>
